package com.cm.projectx.controller.product;

import com.cm.projectx.response.Result;
import com.cm.projectx.service.IProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/v2api/price/product")
public class ProductController {

    @Autowired
    private IProductService productService;

    /**
     * 商品分类查询列表
     * @return
     */
    @GetMapping("list")
    public Result ProductList(){
        Result result = new Result();
        result.setCode(0);
        result.setMsg("业务成功");
        result.addData("list",productService.getProductList());
        return result;
    }
}
